import { atom } from 'jotai';

export interface SwiperItem {
    cover_image_cn:string;
    cover_image_ar: string
    cover_image_en: string
    cover_image_link_ar: string
    cover_image_link_cn: string
    cover_image_link_en: string
    id:number,
    list?:string[]
}

export interface categoryItemType {
    id:number ;
    json_content:{
        icon_all: string
        icon_ar: string
        icon_cn: string
        icon_en: string
        title_ar: string
        title_cn: string
        title_en: string
    },
    sceneList:SceneItemType[];
    loading?:boolean
}
export interface SceneItemType {
    app: string
    app_type:string
    charge_type: string
    createtime: number
    delete_time?: number
    exclude_region: string
    iconDesc?: string
    iconPath?: string
    id:number
    include_region: string
    json_content: {
        app_flow_id:string
        cn:{
            desc:string
            title:string
        },
        cover_image_list:[
            {
                path:string
            }
        ],
        display_mode:string
        flow_param:{
            flow_id:string
        }
        cover_image?:string
    }
    points_json: {
        points:string
    }
    type: string
    tpl_image_list?:[
        {
            id:number
            cat_image:string
            cat_id:number
        }
    ]   
    
}





// 首页频道分类数据
export const categoryListAtom = atom<categoryItemType[]>([]);
// 当前选中categoryId
export const activeCategoryIdAtom = atom(0)
// 轮播图数据
export const swiperListAtom = atom<SwiperItem[]>([])

